import OpenAI from "openai";

const openai = new OpenAI({
  baseURL: "https://openrouter.ai/api/v1",
  apiKey:
    "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",
});

async function main() {
  const completion = await openai.chat.completions.create({
    model: "qwen/qwq-32b:free",
    messages: [
      {
        role: "user",
        content: "What is the meaning of life?",
      },
    ],
  });

  console.log(completion.choices[0].message);
}

main();
